#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

  pi(unsigned int  n)
{
	if (n > 9)
	{
		pi(n / 10);
	}
	printf("%d ", n % 10);
}


int main()
{
	unsigned int num = 0;
	scanf("%u", &num);
	pi(num);
	return 0;

}
